/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package simplemetrosystem.model.Command.EditCommand;

import simplemetrosystem.control.ElementManager;
import simplemetrosystem.model.Command.Command;
import simplemetrosystem.model.Element.MetroEdge;

/**
 *
 * @author Eric Qian
 */
public class RemoveEdgeCommand implements Command {

    public RemoveEdgeCommand(MetroEdge edge) {
        this.edge = edge;
    }

    public void execute() {
        ElementManager.getInstance().removeEdge(edge);
    }

    public void undo() {
        ElementManager.getInstance().addEdge(edge);
    }
    private MetroEdge edge;
}
